using Xunit;
using Xunit.Abstractions;
using FrameIdentityReq.Frames;

namespace xUnitTest
{
    public class TestValidationCodeField
    {
        [Theory]
        [InlineData(ValidationCodeEnum.DeviceDisabled, 0, "ValidationCode")]
        [InlineData(ValidationCodeEnum.DeviceDisabled, 6, "ValidationCode1")]
        [InlineData(ValidationCodeEnum.DeviceDisabled, 7, "ValidationC2")]
        [InlineData(ValidationCodeEnum.DeviceDisabled, 8, "ValidationC3")]
        [InlineData(ValidationCodeEnum.DeviceDisabled, 9, "ValidationC4")]
        public void TestTestValidationCodeFieldTheory(ValidationCodeEnum validationCode, int index, string name)
        {
            BaseFrame frame = new BaseFrame();
            ValidationCodeField field = new ValidationCodeField(frame, index, name);
            field.Value = validationCode;

            Assert.Equal(8, field.Count);

            Assert.Equal(index, field.Index);
            Assert.Equal(name, field.Name);
            Assert.Equal(validationCode, field.Value);
        }
    }
}